package com.wiznbiz.okagent;

import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;

public class IntroActivity extends BaseActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.activity_intro);
		new IntroTask().execute();
	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
	}
	
	private class IntroTask extends AsyncTask<Void, Void, String> {
		@Override
		protected void onPreExecute() {
			super.onPreExecute();
			showProgress();
		}
		
		@Override
		protected String doInBackground(Void... arg0) {
			try{
				Thread.sleep(1000L);
			}catch(Exception e){
				e.printStackTrace();
			}
			return null;
		}
		
		@Override
		protected void onPostExecute(String result) {
			closeProgress();
			Intent intent = new Intent(IntroActivity.this, LoginActivity.class);
			IntroActivity.this.startActivity(intent);;
			IntroActivity.this.finish();
		}		
	}
	
	
	
}
